package cn.iocoder.yudao.module.handguard.dal.mysql.userbasetable11;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.handguard.dal.dataobject.userbasetable11.UserBaseTable11DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.handguard.controller.app.userbasetable11.vo.*;

/**
 * 税贷 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserBaseTable11Mapper extends BaseMapperX<UserBaseTable11DO> {

    default PageResult<UserBaseTable11DO> selectPage(UserBaseTable11PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserBaseTable11DO>()
                .eqIfPresent(UserBaseTable11DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable11DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable11DO::getTaxRating, reqVO.getTaxRating())
                .eqIfPresent(UserBaseTable11DO::getGrossTaxContribution, reqVO.getGrossTaxContribution())
                .eqIfPresent(UserBaseTable11DO::getLiabilities, reqVO.getLiabilities())
                .eqIfPresent(UserBaseTable11DO::getIsGjj, reqVO.getIsGjj())
                .eqIfPresent(UserBaseTable11DO::getIsHouse, reqVO.getIsHouse())
                .eqIfPresent(UserBaseTable11DO::getIsCar, reqVO.getIsCar())
                .betweenIfPresent(UserBaseTable11DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable11DO::getId));
    }

    default List<UserBaseTable11DO> selectList(UserBaseTable11ExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<UserBaseTable11DO>()
                .eqIfPresent(UserBaseTable11DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable11DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable11DO::getTaxRating, reqVO.getTaxRating())
                .eqIfPresent(UserBaseTable11DO::getGrossTaxContribution, reqVO.getGrossTaxContribution())
                .eqIfPresent(UserBaseTable11DO::getLiabilities, reqVO.getLiabilities())
                .eqIfPresent(UserBaseTable11DO::getIsGjj, reqVO.getIsGjj())
                .eqIfPresent(UserBaseTable11DO::getIsHouse, reqVO.getIsHouse())
                .eqIfPresent(UserBaseTable11DO::getIsCar, reqVO.getIsCar())
                .betweenIfPresent(UserBaseTable11DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable11DO::getId));
    }

}
